import request from "@/common/untils/request.js"

// 客户管理列表
export function getClientList(data) {
  return request({
    url: "/api/client/list",
    method: "post",
    data
  })
}
// 添加客户管理
export function getAddClient(data) {
  return request({
    url: "/api/client/add",
    method: "post",
    data
  })
}
// 删除客户管理
export function getDeleteClient(data) {
  return request({
    url: "/api/client/delete",
    method: "delete",
    data
  })
}
// 更新客户管理
export function getUpdateClient(data) {
  return request({
    url: "/api/client/update",
    method: "put",
    data
  })
}

// 获取客户来源列表
export function getClientOrigin() {
  return request({
    url: "/api/clientOrigin/list",
    method: "get"
  })
}

// 获取客户状态列表
export function getClientStatus() {
  return request({
    url: "/api/clientStatus/list",
    method: "get"
  })
}

// 获取客户来源等所有数据
export function getAllData() {
  return request({
    url: "/api/data/getAllData",
    method: "get"
  })
}

// 检查客户名称是否重复
export function checkNameClient(data) {
  return request({
    url: "/api/client/checkName",
    method: "post",
    data
  })
}
